package com.woniuxy.purchasemanager.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.woniuxy.commons.entity.purchaseManager.GoodsEntity;
import com.woniuxy.commons.entity.purchaseManager.ProductEntity;
import com.woniuxy.purchasemanager.dao.ProductDao;
import com.woniuxy.purchasemanager.service.ProductService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author:黄志超
 * @Todo:TODO
 * @DateTime:2022/4/21 14:07
 * @Component:蜗牛
 **/
@Service
public class ProductServiceImpl extends ServiceImpl<ProductDao, GoodsEntity> implements ProductService {

    @Override
    public List<GoodsEntity> selectFindGoods() {
        Page<GoodsEntity> page = new Page<>(1, 5);
        baseMapper.selectPage(page, null);// 第二个参数是Wrapper。高级条件查询，下篇再说，先传null
        List<GoodsEntity> userList = page.getRecords();
        userList.forEach(System.out::println);
        return userList;
    }
}
